home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 52
/
Amiga Format AFCD52 (Issue 136, May 2000).iso
/
-screenplay-
/
hd_installers
/
whdigames
/
whdigamesj-m
/
whdigamesj-m.lzh
/
Legend.lha
/
Legend
/
Install
< prev
next >
Wrap
Text File
|
1998-06-04
|
4KB
|
186 lines
;****************************
(set #sub-dir "") ;sub directory containing data files
(set #readme-file "README") ;name of readme file
(set #cleanup "%s/c/legend" #dest) ;files to delete after install
;****************************
;----------------------------
; Checks if given program is reachable via the path
; if not abort install
; IN: #program - to check
; OUT: -
(procedure P_chkrun
(if
(= 0 (run ("cd SYS:\nWhich %s" #program)))
("")
(abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
)
)
;----------------------------
; Wait for inserting disk
; IN: #AD_disk - name of disk
; OUT: -
(procedure P_disk
(askdisk
(dest " ")
(prompt ("\nInsert \"%s\" in any drive !\n\nPlease insert disks one at a time!" #AD_disk))
(help #insertdisk-help)
)
(P_chkdsk)
)
(set #insertdisk-help
(cat "The two Legend-disks are named the same. "
"Therefore you might confuse this script if you "
"insert both at once.\n\n"
"So, please insert the disks one at a time.\n\n"
@askoptions-help
)
)
(procedure P_chkdsk
(if
(= 0 (run ("which \"%s\"" #program)))
("")
((message ("\nPlease remove the disk currently inserted,\n\nthen insert the \"%s\"." #AD_disk))
(P_disk))
)
)
;****************************
(set #program "WHDLoad")
(P_chkrun)
;(set #program "Reloc")
;(P_chkrun)
(set @default-dest
(askdir
(prompt ("Where should \"%s\" be installed ?\nA drawer \"%s\" will automatically be created." @app-name @app-name))
(help @askdir-help)
(default @default-dest)
(disk)
)
)
(set #dest (tackon @default-dest @app-name))
(if
(exists #dest)
(
(set #choice
(askbool
(prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
(default 1)
(choices "Delete" "Skip")
(help @askbool-help)
)
)
(if
(= #choice 1)
(run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
)
)
)
(makedir #dest
(help @makedir-help)
(infos)
)
;----------------------------
(copyfiles
(help @copyfiles-help)
(source ("legend.slave"))
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("Legend.inf"))
(newname ("Legend.info"))
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("getlegendsavedisk.slave"))
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("Install_Savedisk"))
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("Install_savedisk.inf"))
(newname ("Install_Savedisk.info"))
(dest #dest)
)
(if
(exists #readme-file)
(copyfiles
(help @copyfiles-help)
(source #readme-file)
(dest #dest)
)
)
(if
(= #sub-dir "")
("")
(
(set #dest (tackon #dest #sub-dir))
(makedir #dest
(help @makedir-help)
)
)
)
;----------------------------
(set #AD_disk "Legend Boot Disk")
(set #program " :C/LEGEND")
(P_disk)
(copyfiles
(help @copyfiles-help)
(source (" :"))
(dest #dest)
(pattern "~(s)")
)
(if
(= 0 (run "Reloc" (tackon #dest "c/legend") (tackon #dest "c/legend.10000") "ADR=$10000" "QUIET" ">con://///WAIT/CLOSE/AUTO"))
("")
(abort "\"Reloc\" has failed")
)
(set #AD_disk "Legend World Disk")
(set #program " :SPIT/M00.PAC")
(P_disk)
(copyfiles
(help @copyfiles-help)
(source (" :"))
(dest #dest)
(pattern "#?")
)
;----------------------------
(run ("delete %s ALL QUIET FORCE" #cleanup))
(if
(exists #readme-file)
(if
(= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
("")
(run ("SYS:Utilities/More %s" #readme-file))
)
)
(exit)